// 引入路由插件
import {HashRouter as Router,Route,Redirect} from "react-router-dom"
// 引入路由组件
import NavBar from "./pages/NavBar/NavBar";
import CityList from "./pages/CityList/CityList";
import Detail from "./pages/Detail/Detail";
function App() {
  return (
    <div className="App">
        {/* 路由 */}

        <Router>
           <Route path="/nav" component={NavBar}></Route>
           <Redirect from="/*" to="/nav/index" />
           <Route path="/city" component={CityList} />
           <Route path="/det/:code" component={Detail} />
        </Router>
    </div>
  );
}

export default App;
